package com.tabjin.rfidsocket.mapper.mapper;

import com.tabjin.rfidsocket.pojo.SysRoleAcl;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author tabjin
 * create at 2020/12/25 14:52
 * @program rfid_socket
 * @description
 */
@Mapper
public interface SysRoleAclCustomMapper {
    /**
     * 获取角色的已分配的权限点列表
     *
     * @param roleIdList
     * @return
     */
    List<Integer> getAclIdListByRoleIdList(@Param(value = "roleIdList") List<Integer> roleIdList);

    /**
     * 根据权限点获取角色id列表
     *
     * @param aclId
     * @return
     */
    List<Integer> getRoleIdListByAclId(@Param(value = "aclId") Integer aclId);

    /**
     * 批量增加
     *
     * @param sysRoleAclList
     */
    void batchInsert(@Param(value = "roleAclList") List<SysRoleAcl> sysRoleAclList);

    void deleteByRoleId(@Param(value = "roleId") Integer roleId);
}
